import 'dart:convert';
/// id : "1"
/// ctime : 1644415808000
/// content : "helloworld"
/// fid : "1234325425"
/// friendName : "陌生人"

ChatRecord chatRecordFromJson(String str) => ChatRecord.fromJson(json.decode(str));
String chatRecordToJson(ChatRecord data) => json.encode(data.toJson());
class ChatRecord {
  ChatRecord({
      String? id, 
      int? ctime, 
      String? content, 
      String? fid, 
      String? friendName,}){
    _id = id;
    _ctime = ctime;
    _content = content;
    _fid = fid;
    _friendName = friendName;
}

  ChatRecord.fromJson(dynamic json) {
    _id = json['id'];
    _ctime = json['ctime'];
    _content = json['content'];
    _fid = json['fid'];
    _friendName = json['friendName'];
  }
  String? _id;
  int? _ctime;
  String? _content;
  String? _fid;
  String? _friendName;

  String? get id => _id;
  int? get ctime => _ctime;
  String? get content => _content;
  String? get fid => _fid;
  String? get friendName => _friendName;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['ctime'] = _ctime;
    map['content'] = _content;
    map['fid'] = _fid;
    map['friendName'] = _friendName;
    return map;
  }

}